package com.luckyframe.project.jmeter.jmeterTestPlanMetric.service;

import com.luckyframe.common.support.Convert;
import com.luckyframe.project.jmeter.jmeterTestPlanMetric.domain.JmeterTestPlanMetric;
import com.luckyframe.project.jmeter.jmeterTestPlanMetric.mapper.JmeterTestPlanMetricMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 指标监控 服务层实现
 * 
 * @author lancelot
 * @date 2020-11-09
 */
@Service
public class JmeterTestPlanMetricServiceImpl implements IJmeterTestPlanMetricService 
{
	@Autowired
	private JmeterTestPlanMetricMapper jmeterTestPlanMetricMapper;

	/**
     * 查询指标监控信息
     * 
     * @param id 指标监控ID 主键ID
     * @return 指标监控信息 基础信息
     */
    @Override
	public JmeterTestPlanMetric selectJmeterTestPlanMetricById(Long id)
	{
	    return jmeterTestPlanMetricMapper.selectJmeterTestPlanMetricById(id);
	}
	
	/**
     * 查询指标监控列表
     * 
     * @param jmeterTestPlanMetric 指标监控信息 基础信息
     * @return 指标监控集合
     */
	@Override
	public List<JmeterTestPlanMetric> selectJmeterTestPlanMetricList(JmeterTestPlanMetric jmeterTestPlanMetric)
	{
	    return jmeterTestPlanMetricMapper.selectJmeterTestPlanMetricList(jmeterTestPlanMetric);
	}
	
    /**
     * 新增指标监控
     * 
     * @param jmeterTestPlanMetric 指标监控信息 基础信息
     * @return 结果
     */
	@Override
	public int insertJmeterTestPlanMetric(JmeterTestPlanMetric jmeterTestPlanMetric)
	{
	    return jmeterTestPlanMetricMapper.insertJmeterTestPlanMetric(jmeterTestPlanMetric);
	}
	
	/**
     * 修改指标监控
     * 
     * @param jmeterTestPlanMetric 指标监控信息 基础信息
     * @return 结果
     */
	@Override
	public int updateJmeterTestPlanMetric(JmeterTestPlanMetric jmeterTestPlanMetric)
	{
	    return jmeterTestPlanMetricMapper.updateJmeterTestPlanMetric(jmeterTestPlanMetric);
	}

	/**
     * 删除指标监控对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteJmeterTestPlanMetricByIds(String ids)
	{
		return jmeterTestPlanMetricMapper.deleteJmeterTestPlanMetricByIds(Convert.toStrArray(ids));
	}

    @Override
    public List<JmeterTestPlanMetric> listByIds(List<Long> ids) {
		return jmeterTestPlanMetricMapper.listByIds(ids);

	}

}
